Skip to content

feat(desktop,doctor): scan-to-open QR, network diagnostics, scrollable tool panel - #95

Merged
pyramation merged 1 commit into
mainfrom
feat/lan-qr-and-network-doctor
Aug 9, 2026
Merged

feat(desktop,doctor): scan-to-open QR, network diagnostics, scrollable tool panel#95
pyramation merged 1 commit into
mainfrom
feat/lan-qr-and-network-doctor

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Three things: a QR code to open the show on a phone, diagnostics that say why a phone can't, and a Patterns tab that stops eating the grid.

Scan to open (Show route). The bare LAN: 192.168.… text becomes a popover with a QR of that URL, a copy button, and a picker when the laptop holds several addresses. Nothing is persisted — the URLs come from BrainStatus.lanUrls (recomputed from live interfaces every status read) and the control isn't rendered while the brain is down. Ordering is rankLanUrls: 192.168/16 first, then 10/8, then 172.16/12, with 169.254 (DHCP never completed) last, so the address a phone is actually on leads instead of a docker bridge.

One Electron wrinkle: the laser UI is a native WebContentsView stacked above the page, so a popover overlapping it would be invisible. The route hides the view while the QR is open (visible: !sharing) and restores it on close.

Network doctor (Status → Advanced, and wavegrid doctor). The honest answer to "should the LAN URL work on the same wifi?" — the server does bind 0.0.0.0, so the URL is real, but a venue/guest network with client isolation blocks it anyway and a laptop cannot prove reachability by itself. So the report separates evidence from inference:

visitors.length > 0        → proven-reachable   (a real device loaded the show)
bindHost is loopback       → loopback-only
no interfaces              → no-network
a self-probe failed        → blocked-locally    (host firewall)
neighbours known and <= 1  → isolation-likely   (only the gateway is visible)
otherwise                  → unproven           ("scan the QR — that's the only proof")

The positive evidence is new: http-app.ts records non-loopback HTTP clients into a bounded (20) in-memory map surfaced as SystemStatus.lanVisitors, so "a phone reached the brain" becomes a fact rather than a guess. probeNetwork drops visitors whose address is one of our own interfaces — a browser on this laptop opening the LAN URL proves nothing. Neighbour discovery shells out to arp -an and reports neighboursKnown: false when that isn't available, so an unreadable table never reads as "nobody is there". verdictFor is pure and tested.

runningBind() is new because BrainStatus.url is deliberately the loopback URL the embedded UI loads; diagnostics need the actual bind host.

Patterns scroll (packages/ui). The bottom tool panel had no height cap and no internal scroll, so a tall tab pushed the grid off screen. It's now maxHeight: 50% with the content area flex-1 overflow-y-auto; the right-hand layout is unchanged.

Verified against a running show on this box: doctor printed proven-reachable for a real request over the LAN IP, and blocked-locally/unproven classifications are covered by tests. pnpm test, pnpm build, pnpm lint all pass.

Link to Devin session: https://app.devin.ai/sessions/972698f89f494b86828010666a002b8f
Requested by: @pyramation

@pyramation pyramation self-assigned this Aug 9, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​qrcode@​1.5.61001007481100
Addedqrcode@​1.5.410010010082100

View full report

@pyramation
pyramation merged commit 4e5ac1c into main Aug 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant